package com.zlyx.easy.api.config;

import java.util.List;

import org.apache.maven.model.Developer;
import org.springframework.boot.context.properties.ConfigurationProperties;

import com.zlyx.easy.core.maven.MavenUtils;

/**
 * @Auth 赵光
 * @Desc 描述
 */
@ConfigurationProperties("easy.api")
public class ApiProperties {

	private boolean disable = false;

	private String basePath = "/";

	private String name = MavenUtils.getModel().getName();

	private String version = MavenUtils.getModel().getVersion();

	private String groupId = MavenUtils.getModel().getGroupId();

	private String artifactId = MavenUtils.getModel().getArtifactId();

	/**
	 * 项目代码托管地址
	 */
	private String url = MavenUtils.getModel().getScm().getUrl();

	private List<Developer> developers = MavenUtils.getModel().getDevelopers();

	public String getName() {
		return name;
	}

	public ApiProperties setName(String name) {
		this.name = name;
		return this;
	}

	public String getVersion() {
		return version;
	}

	public ApiProperties setVersion(String version) {
		this.version = version;
		return this;
	}

	public String getGroupId() {
		return groupId;
	}

	public ApiProperties setGroupId(String groupId) {
		this.groupId = groupId;
		return this;
	}

	public String getArtifactId() {
		return artifactId;
	}

	public ApiProperties setArtifactId(String artifactId) {
		this.artifactId = artifactId;
		return this;
	}

	public boolean isDisable() {
		return disable;
	}

	public ApiProperties setDisable(boolean disable) {
		this.disable = disable;
		return this;
	}

	public String getUrl() {
		return url;
	}

	public ApiProperties setUrl(String url) {
		this.url = url;
		return this;
	}

	public List<Developer> getDevelopers() {
		return developers;
	}

	public ApiProperties setDevelopers(List<Developer> developers) {
		this.developers = developers;
		return this;
	}

	public String getBasePath() {
		return basePath;
	}

	public ApiProperties setBasePath(String basePath) {
		this.basePath = basePath;
		return this;
	}

}
